<div class="row-fluid" >
    <div class="span12">
        <div class="box box-color box-bordered">
            <div class="nomargin box-title">
                <h3>Categorias</h3>
                <div class="actions">
                    <?php echo $this->Html->link('<i class="icon-plus-sign"></i> Novo',array('controller'=>'categories','action'=>'add'),array('class'=>'btn btn-primary','escape'=>false,'rel'=>"tooltip",'data-placement'=>"left",'data-original-title'=>"Adicionar nova Situação.")); ?>
                </div>
            </div>
            <div class="box-content nopadding">
                <table class="table table-hover table-nomargin dataTable table-bordered dataTable-scroll-y dataTable-scroll-x">
                    <thead>
                    <tr>
                        <th><?php echo $this->Paginator->sort('name','Situação'); ?></th>
                        <th class="col_action span2"><?php echo __('Opções'); ?></th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php
                    if(!empty($categories)):
                        foreach($categories as $category): ?>
                            <tr>
                                <td><?php echo h($category['Category']['name']); ?>&nbsp;</td>
                                <td class="actions">
                                    <?php echo $this->Html->link(__('View'), array('action' => 'view', $category['Category']['id'])); ?>
                                    <?php echo $this->Html->link(__('Edit'), array('action' => 'edit', $category['Category']['id'])); ?>
                                    <?php echo $this->Form->postLink(__('Delete'), array('action' => 'delete', $category['Category']['id']), null, __('Are you sure you want to delete # %s?', $category['Category']['id'])); ?>
                                </td>
                            </tr>
                        <?php
                        endforeach;
                    else:
                        ?>
                        <tr>
                            <td colspan="2"><span class="alert alert-info span12 nomargin"><strong>INFORMAÇÃO:&nbsp;</strong>Não foi encontrado resultado em nosso banco</span></td>
                        </tr>
                    <?php endif;?>
                    </tbody>
                </table>
                <?php echo $this->Element('_paginate')?>
            </div>
        </div>
    </div>
</div>
<?php echo $this->Element('_modalView');?>
